package com.masterrabbit.controller;

import com.masterrabbit.domain.UserCoupons;
import com.masterrabbit.service.UserCouponsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/coupons")
public class UserCouponsController {
    @Autowired
    private UserCouponsService userCouponsService;
    @RequestMapping("/search")
    public List<UserCoupons> selectByUserId(Integer userId){
        return userCouponsService.selectByUserId(userId);
    }


}
